package com.mercury.ec.module.air.controller.admin.order.vo.orderpassenger;

import com.mercury.ec.module.air.controller.admin.order.validator.AirOrderPassengerIssuedSequenceProvider;
import com.mercury.ec.module.air.validator.AirGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.group.GroupSequenceProvider;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@GroupSequenceProvider(value = AirOrderPassengerIssuedSequenceProvider.class)
@Schema(description = "管理后台 - 机票订单乘客已出票 Request VO")
public class AirOrderPassengerIssuedReqVO {

//    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "23606")
//    private Long id;
//
//    @Schema(description = "订单id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1949")
//    @NotNull(message = "订单id不能为空")
//    private Long orderId;

    @Schema(description = "序号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "序号不能为空")
    private Integer serialNo;

    @Schema(description = "乘客类型 字典（system_passenger_type 1-成人/2-儿童/3-婴儿）", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "乘客类型不能为空")
    private Integer type;

//    @Schema(description = "国家代码 见表（basic_country.no）", requiredMode = Schema.RequiredMode.REQUIRED, example = "CN")
    @Schema(description = "国家代码 见表（basic_country.no）", example = "CN")
//    @NotBlank(message = "国家代码不能为空")
    @Size(max = 3, message = "国家代码长度不能超过3")
    private String countryNo;

    @Schema(description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    @NotEmpty(message = "姓名不能为空")
    @Length(max = 64, message = "姓名长度不能超过64")
    private String name;

//    @Schema(description = "性别 字典（system_user_sex）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @Schema(description = "性别 字典（system_user_sex）", example = "1")
//    @NotNull(message = "性别不能为空")
    private Integer sex;

//    @Schema(description = "证件类型 字典（system_card_type）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @Schema(description = "证件类型 字典（system_card_type）", example = "1")
//    @NotNull(message = "证件类型不能为空")
    private Integer cardType;

//    @Schema(description = "证件号", requiredMode = Schema.RequiredMode.REQUIRED, example = "123456789")
    @Schema(description = "证件号", example = "123456789")
//    @NotEmpty(message = "证件号不能为空")
    @Length(max = 32, message = "证件号长度在32位以内")
    private String cardNo;

    @Schema(description = "证件有效期")
    private LocalDate cardValidDate;

//    @Schema(description = "证件签发国家代码（非身份证必填） 见表（basic_country.no）", requiredMode = Schema.RequiredMode.REQUIRED, example = "CN")
    @Schema(description = "证件签发国家代码 见表（basic_country.no）", example = "CN")
//    @NotNull(message = "证件签发国家不能为空", groups = {AirOrderPassengerGroup.NotIdCard.class})
    @Length(max = 3, message = "证件签发国家代码长度不能超过3")
    private String cardIssuingCountryNo;

    @Schema(description = "出生日期")
    private LocalDate birthday;

    @Schema(description = "是否携带婴儿")
    @NotNull(message = "是否携带婴儿不能为空")
    private Boolean haveBaby;

    @Schema(description = "监护人姓名", example = "赵六")
    @Length(max = 64, message = "监护人姓名长度不能超过64")
    private String guardianName;

    @Schema(description = "手机号")
    @Length(max = 16, message = "手机号长度不能超过16")
    private String mobile;

    @Schema(description = "邮箱")
    @Length(max = 128, message = "邮箱长度不能超过128")
    private String email;

    @Schema(description = "是否发送短信", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "是否发送短信不能为空")
    private Boolean sendSms;

    @Schema(description = "GP验证类型（GP协议必填） 字典（air_gp_check_type 1-公务卡/2-预算单位）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "GP验证类型不能为空", groups = {AirGroup.Gp.class})
    private Integer gpCheckType;

    @Schema(description = "GP公务卡发卡银行（GP公务卡验证必填） 字典（system_bank）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "GP公务卡发卡银行不能为空", groups = {AirGroup.GpBusinessCard.class})
    private Integer gpBank;

    @Schema(description = "GP预算公司（GP预算单位验证必填）", requiredMode = Schema.RequiredMode.REQUIRED, example = "")
    @NotBlank(message = "GP预算公司不能为空", groups = {AirGroup.GpBudgetCorp.class})
    private String gpBudgetCorp;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "创建人")
    private String creator;
}
